<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>文章评论</title>
  <!-- 新 Bootstrap4 核心 CSS 文件 -->
  <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
  <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
  <!-- bootstrap.bundle.min.js 用于弹窗、提示、下拉菜单，包含了 popper.min.js -->
  <script src="https://cdn.staticfile.org/popper.js/1.15.0/umd/popper.min.js"></script>

  <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  <script src="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a  th:href="@{/index}">主页</a></li>
    <li class="breadcrumb-item active">文章评论</li>
  </ol>
  <h2>文章评论</h2>
  <table class="table table-hover">
    <thead>
    <tr>
      <td>用户姓名</td>
      <td>评论内容</td>
      <td>评论文章名</td>
      <td>评论时间</td>
      <td>删除</td>
    </tr>
    </thead>
    <tbody>
    <tr th:each="MyAreMarkVO:${page.getRecords()}">
      <td th:text="${MyAreMarkVO.userNickName}"></td>
      <td th:text="${MyAreMarkVO.aremarkContent}"></td>
      <td th:text="${MyAreMarkVO.articleTitle}"></td>
      <td th:text="${MyAreMarkVO.aremarkTime}"></td>
     <td><a th:href="@{/user/delAreMark(id=${MyAreMarkVO.getAremarkId()})}">删除</a></td>
    </tr>
    </tbody>
  </table>
  <nav class="pagination-container">
    <ul class="pagination">
      <li th:class="${page.hasPrevious()?'':'disabled'}">
        <a th:unless="${page.current}==1" th:href="@{/user/toAreMark(pageIndex=${page.current}-1)}" aria-label="Previous">
          <span aria-hidden="true">上一页</span>
        </a>
        <a th:if="${page.current}==1" href="javascript:void(0);" aria-label="Previous">
          <span aria-hidden="true">上一页</span>
        </a>
      </li>
      <li th:class="${page.current} eq 1 ? 'active':''">
        <a th:href="@{/user/toAreMark(pageIndex=1,search=${search})}">首页</a>
      </li>
      <li>
        <a href="#">第[[${page.current}]]页/共[[${page.pages}]]页</a>
      </li>
      <li  th:class="${page.current}==${page.pages} ? 'active':''">
        <a th:href="@{/user/toAreMark(pageIndex=${page.pages},search=${search})}">尾页</a>
      </li>

      <li th:class="${page.hasNext()?'':'disabled'}">
        <a th:unless="${page.current}==${page.pages}" aria-label="Next"
           th:href="@{/user/toAreMark(pageIndex=${page.current}+1,search=${search})}">
          <span aria-hidden="true">下一页</span>
        </a>
        <a th:if="${page.current}==${page.pages}" aria-label="Next"
           href="javascript:void(0);">
          <span aria-hidden="true">下一页</span>
        </a>
      </li>
    </ul>
  </nav>
</div>
</body>
</html>